package io.jpress.core.editor;

import com.jfinal.core.Controller;
import io.jpress.JPressConsts;

import java.util.function.Function;

public class EditorInfo {

    private String id;
    private String htmlFile;
    private String jsFile;
    private String editMode = JPressConsts.EDIT_MODE_HTML;

    //渲染条件
    private Function<Controller,Boolean> renderCondition;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getHtmlFile() {
        return htmlFile;
    }

    public void setHtmlFile(String htmlFile) {
        this.htmlFile = htmlFile;
    }

    public String getJsFile() {
        return jsFile;
    }

    public void setJsFile(String jsFile) {
        this.jsFile = jsFile;
    }

    public Function<Controller, Boolean> getRenderCondition() {
        return renderCondition;
    }

    public void setRenderCondition(Function<Controller, Boolean> renderCondition) {
        this.renderCondition = renderCondition;
    }

    public String getEditMode() {
        return editMode;
    }

    public void setEditMode(String editMode) {
        this.editMode = editMode;
    }

    public String getHtml(){
        return htmlFile;
    }

    public String getJs(){
        return jsFile;
    }
}
